<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="{% static 'bbs/css/main.css' %}" type="text/css">
    <title>YYin</title>
</head>

<body>

    <h1>{{ bs_p.title }}</h1>

<table>
    <tr>
        <td><h3>{{ bs_p.content }}</h3></td>
    </tr>
</table>

<h1>留言板</h1>
<form action="{% url 'bbs:detail' bs_p.pk %}" method="post">
    {% csrf_token %}

<p>留言</p>
<table>
<tr>
    <th>姓名</th>
    <td>
        <input type="text" size=20" name="name">
    </td>
</tr>
<tr>
    <th>内容</th>
    <td>
        <textarea rows="5" cols="40" name="comment"></textarea>
    </td>
</tr>
</table>
<p><button type="submit">提交</button></p>
</form>

<div class="entries-area">
<h2>留言记录</h2>
{% for c in comm %}
    <table>
        <tr>
            <td>评论人: {{ c.com_name }}</td>
        </tr>
        <tr>
            <td>评论内容: {{ c.com_content }}</td>
        </tr>
        <tr>
            <td>评论时间: {{ c.con_created }}</td>
        </tr>
    </table>
    <br>
{% endfor %}
</div>

</body>
</html>

